﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Spawner : MonoBehaviour
{
    public float spawnDelay;
    public float spawTime;
    public GameObject[] enemies;

    // Start is called before the first frame update
    void Start()
    {
        InvokeRepeating("Spawn", spawnDelay, spawTime);
    }
    void Spawn()
    {
        Instantiate(enemies[Random.Range(0, enemies.Length)], transform.position, transform.rotation);
    }
}
